package Test03_answer;
/**
 * 现按月计算工资的员工处 理。
 * 该类包括：private成员变量monthlySalary； 
 * 实现父类的抽象方法earnings(),该方法返回monthlySalary值；
 * toString()方法输出员工类型信息及员工的name，number,birthday。
 * @author Administrator
 *
 */
public class SalariedEmployee extends Employee{
	
	public SalariedEmployee(){
		
	}
	
	public SalariedEmployee(String name, String number, MyDate birthday,int monthlySalary) {
		super(name,number,birthday);
		this.monthlySalary = monthlySalary;
	}

	private int monthlySalary;

	@Override
	public int earnings() {
		 return monthlySalary;
	}
	
	public String toString(){
		return "月份工" + "---" + getName() + "---" + getNumber() + "---" + getBirthday().toDateString() + "---" + monthlySalary;
	}

}
